<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.lmpop.trade.ti_internews.*" %>
<%@page import="java.util.*" %>
<%@ page import="com.lmpop.frame.util.PageTools" %>
<%
	request.setCharacterEncoding("UTF-8");
	
	Map ti_internews = new Hashtable();
	
	String newstitle = "";
	if(request.getParameter("newstitle")!=null && !request.getParameter("newstitle").equals("")){
		newstitle = request.getParameter("newstitle").trim();
		ti_internews.put("title",newstitle);
	}
	ti_internews.put("type","0");
	
	String end_date = "";
	if(request.getParameter("txtEndDate")!=null && !request.getParameter("txtEndDate").equals("")){
		end_date = request.getParameter("txtEndDate");
		ti_internews.put("end_date",end_date);
	}	
	String now = "";
	if(request.getParameter("now")!=null && !request.getParameter("now").equals("")){
		now = new Date().toLocaleString();
		now=now.substring(0,10);
		ti_internews.put("start_date",now);
	}
	String start_date = "";
	if(request.getParameter("txtStartDate")!=null && !request.getParameter("txtStartDate").equals("")){
		start_date = request.getParameter("txtStartDate");
		ti_internews.put("start_date",start_date);
	}
	
	Ti_internewsInfo ti_internewsInfo = new Ti_internewsInfo();
	String iStart = "0";
	int limit = 20;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = ti_internewsInfo.getListByPage(ti_internews,Integer.parseInt(iStart),limit);
	int counter = ti_internewsInfo.getCountByObj(ti_internews);
	String pageString = new PageTools().getGoogleToolsBar(counter,"member_index.html?newstitle="+newstitle+"&txtEndDate="+end_date+"&txtStartDate="+start_date+"&iStart=",Integer.parseInt(iStart),limit);
	String para = "newstitle="+newstitle+"&txtEndDate="+end_date+"&txtStartDate="+start_date+"&iStart="+Integer.parseInt(iStart); 

%>
	<table class="tablelist1">
		<thead>
			<tr class="deal">
				<th width="200px">标题</th>
				<th  width="100px" >时间</th>
            </tr>
       </thead>
	
	<% 
		int listsize = 0;
		if(list!=null && list.size()>0){
			listsize = list.size();
		  		for(int i=0;i<list.size();i++){
		  			Hashtable map = (Hashtable)list.get(i);
		  			String title="",publish_date="",news_id="";
		  			if(map.get("news_id")!=null) news_id = map.get("news_id").toString();
				  	if(map.get("title")!=null) title = map.get("title").toString(); 
				  	 if(title.length()>50) title=title.substring(0,50)+"..."; 
				  	if(map.get("publish_date")!=null) publish_date = map.get("publish_date").toString();
					if(publish_date.length()>10) publish_date=publish_date.substring(0,10);
		  %>
		
		<tr>

		  <td height="60" width="200px"><a href="#" onclick="showFile('<%=news_id%>')"><%=title%></a></td>
	      <td><%=publish_date%></td>

		</tr>

		  <%
		  		}
		  	}
		  %>
		
       </table>
<div style="float:right; margin-top:10px;">
<%=pageString%>  	 
</div>		